file(GLOB  CHEM_SRC_FILES
    "*.f90"
)

set(sources-chem-fpp
    module_chem_loader.fpp
)
fypp_preprocess("${sources-chem-fpp}" sources-chem-postfpp)

#include_directories(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/include/petsc_wrapper)

set(CHEM_SRC_FILES ${CHEM_SRC_FILES} CACHE STRING INTERNAL)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/)
set(CMAKE_Fortran_MODULE_DIRECTORY ${PROJECT_SOURCE_DIR}/include/chem)
add_library(chem ${CHEM_SRC_FILES} ${sources-chem-postfpp})
target_link_libraries(chem PkgConfig::fortran_stdlib fortran-yaml-c)
target_include_directories(chem PUBLIC ${PROJECT_SOURCE_DIR}/include/chem ${PROJECT_SOURCE_DIR}/include)
